<template>
  <div>
    <V-CommonHeaderLeft>
      <div class="container">
        <div class="nav">
          <navigation :msg="navMsg"></navigation>
        </div>
        <div class="content">
          <div class="nav1">
            <navigationChain :chain="chain"></navigationChain>
          </div>
          <div id="box" :style="{ height:height}">
            <div class="head">
              <p>示例：订货单号：DH-20161206-0001 出库单号：CK-20161206-0001</p>
              <p>“DH”是订货拼音首字母，不能修改。</p>
              <p>“20170103”是订单生成日期，不能修改。</p>
              <p>“1002”是流水号随着订单不断积累，规则可修改。</p>
            </div>
            <div id="items">
              <div class="item">
                <p>订货单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
              <div class="item">
                <p>退货单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
              <div class="item">
                <p>采购单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
              <div class="item">
                <p>采购退货单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
              <div class="item">
                <p>出库单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
              <div class="item">
                <p>入库单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
              <div class="item">
                <p>盘点单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
              <div class="item">
                <p>收款单单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
              <div class="item">
                <p>付款单单号设置</p>
                <div class="box">
                  <div class="text">
                    <p>日期格式</p>
                    <el-select v-model="value0" placeholder="yyMMdd">
                      <el-option
                        v-for="item in options0"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p class="p1">流水号长度</p>
                    <el-select v-model="value1" placeholder="6">
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                  <div class="text">
                    <p>分隔符号</p>
                    <el-select v-model="value2" placeholder="_" clearable>
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </V-CommonHeaderLeft>
  </div>
</template>

<script>
import navigationChain from '@/views/setUp/navigationChain/navigationChain'
import VCommonHeaderLeft from '@/components/common/vCommonHeaderLeft/VCommonHeaderLeft'
import navigation from '@/components/common/navigation/Navigation'
export default {
  data () {
    return {
      chain: '2',
      height: '',
      options0: [
        {
          value: 'yyyyMMdd',
          label: 'yyyyMMdd'
        },
        {
          value: 'yyMMdd',
          label: 'yyMMdd'
        },
        {
          value: 'yyyyMM',
          label: 'yyyyMM'
        }
      ],
      options1: [
        {
          value: '3',
          label: '3'
        },
        {
          value: '4',
          label: '4'
        },
        {
          value: '5',
          label: '5'
        },
        {
          value: '6',
          label: '6'
        }
      ],
      options2: [
        {
          value: '-',
          label: '-'
        },
        {
          value: '_',
          label: '_'
        },
        {
          value: '/',
          label: '/'
        }
      ],
      value0: '',
      value1: '',
      value2: '',
      navMsg: [
        {
          name: '设置',
          path: '/enterpriseInformation'
        }, {
          name: '单号设置',
          path: ''
        }
      ]
    }
  },
  created () {
    this.getHeight()
  },
  methods: {
    getHeight () {
      this.height = window.innerHeight - 180 + 'px'
    }
  },
  components: {
    VCommonHeaderLeft,
    navigation,
    navigationChain
  }
}
</script>

<style lang="scss" scoped>
.container {
  width: 100%;
  margin-right: 10px;
  .content {
    width: 100%;
    background-color: #fff;
    overflow: hidden;
    #box {
      overflow-y: scroll;

      .head {
        padding: 20px;
        p {
          color: #b3b3c4;
          font-size: 12px;
          line-height: 18px;
          &:nth-of-type(2),
          &:nth-of-type(3),
          &:nth-of-type(4) {
            text-indent: 2em;
          }
          &:last-child {
            padding-bottom: 15px;
            border-bottom: 1px solid #e3e3e3;
          }
        }
      }
      #items {
        padding-left: 20px;
        .item {
          margin-top: 30px;
          &:last-child {
            padding-bottom: 80px;
          }
          &:first-child {
            margin-top: 5px;
          }
          p {
            font-weight: 700;
          }
          .box {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            .text {
              padding-top: 30px;
              display: flex;
              justify-content: flex-start;
              align-items: center;
              &:nth-of-type(2),
              &:last-child {
                margin-left: 10%;
              }

              p {
                font-weight: normal;
                font-size: 12px;
                width: 50px;
                height: 30px;
                text-align: right;
                line-height: 30px;
                margin-right: 10px;
                &.p1 {
                  line-height: 15px;
                }
              }
            }
          }
        }
      }
    }
  }
}
</style>
